package com.ysw.开发工具系列.swagger.controller;

import com.ysw.dto.ResponseResult;
import com.ysw.开发工具系列.swagger.model.Address;
import io.swagger.annotations.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;

/**
 * @author: yu_sw
 * @Description: com.ysw.开发工具系列.swagger.controller
 * @date:2022/5/21 3:38
 */

@RestController
public class SwaggerController2 {
    @ApiOperation("地址管理类")
    @GetMapping("/getNameAddress")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "type", value = "类型", required = true),
            @ApiImplicitParam(name = "port", value = "是否app：true（是），其他就不是",dataType = "Boolean"),
    })
    public ResponseResult result(String type,String port){
        Address address = new Address();
        address.setAge(22);
        address.setBirth(LocalDateTime.now());
        address.setName("张三");
        return ResponseResult.success(address);
    }
}
